package com.gydz.gydzbaseframeworkboot.SystemControl.service.impl;

import com.gydz.gydzbaseframeworkboot.SystemControl.dao.OperationLogMapper;
import com.gydz.gydzbaseframeworkboot.SystemControl.domain.OperationLog;
import com.gydz.gydzbaseframeworkboot.SystemControl.service.OperLogService;
import com.gydz.gydzbaseframeworkboot.Common.utils.queryParam.QueryParam;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("OperLogService")
public class OperLogServiceImpl implements OperLogService {

    @Resource
    private OperationLogMapper operLogMapper;

    /**
     * 查询所有系统日志
     */
    @Override
    public List<OperationLog> getAllOperLogs() {
        return operLogMapper.getAllOperLogs();
    }

    /**
     * 根据查询条件获取系统日志
     */
    @Override
    public List<OperationLog> getOperLogByKeyWord(QueryParam queryParam) {
        return operLogMapper.getOperLogByKeyword(queryParam);
    }

    /**
     * 新增系统日志
     */
    @Override
    public void addOperLog(OperationLog user) {
        operLogMapper.addOperLog(user);
    }
}
